package Logica;

import DAO.PenDao;
import DAO.TreatmentDao;

import java.sql.Date;

import java.util.ArrayList;

public class Pen {
  //Primary Key:
  private int NumberPen;
  //Attributes

  private int capacity;
  private String status = new String();
  //private ArrayList<WaitingList> waiting = new ArrayList<WaitingList>();

  PenDao pd = new PenDao();


  public Pen() {
  }


  public void setNumberPen(int NumberPen) {
    this.NumberPen = NumberPen;
  }

  public int getNumberPen() {
    return NumberPen;
  }

  public void setCapacity(int capacity) {
    this.capacity = capacity;
  }

  public int getCapacity() {
    return capacity;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public String getStatus() {
    return status;
  }

 

 /* public void setWaiting(ArrayList<WaitingList> waiting) {
    this.waiting = waiting;
  }

  public ArrayList<WaitingList> getWaiting() {
    return waiting;
  }*/


  public Object[][] DarDatosGuiPen() {
      Object[][] datos = new Object[100][100];
      datos = pd.DatosPenTabla();

      /*for (int f = 1; f < 9; f++) {
        for (int g = 0; g < 9; g++) {
          System.out.println(" LOGICA!!!!");
          System.out.print(datos[f][g]);
        }
      }
      */
      return datos;
  }

  public void modificaPenCapacity(String nuevoCap, String NumPen) {
    int numpen = Integer.valueOf(NumPen);
    int canti = Integer.valueOf(nuevoCap);
    pd.modificaPenCapacity(numpen, canti);
  }

  public void modificaClinicPen(String NumPen, String clinicNum) {
    int numPen = Integer.valueOf(NumPen);
    int clin = Integer.valueOf(clinicNum);
    System.out.println(clinicNum);
    pd.modificaPenClinic(numPen, clin);
  }

  public void modificaStatusPen(String Numpen, String status) {
    System.out.println("Estoy aca " + Numpen + " " + status);
    int numpen = Integer.valueOf(Numpen);
    pd.modificaPenStatus(numpen, status);
  }


  public boolean creaPen(String capacity, String status,
                         String clinic) {
    System.out.println(capacity);
    int capacidad = Integer.valueOf(capacity);
    int clinNum = Integer.valueOf(clinic);
    return  pd.creaPen(capacidad, status, clinNum);
    
  }
  public boolean EliminarJaula(String NumPen){
    return pd.eliminarPen(Integer.valueOf(NumPen));   
    
  }
  
}
  
